<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MyPetStore</title>
  <link rel="stylesheet" href="/css/mypetstore.css" type="text/css" media="screen"/>
  <link rel="stylesheet" href="/css/welcom-style.css">
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  <style>
    /* 通用样式 */
    body {
      font-family: Arial, sans-serif;
      background-color: #f4f4f9;
      margin: 0;
      padding: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    #Content {
      background: white;
      padding: 30px;
      border-radius: 10px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      max-width: 400px;
      width: 100%;
      text-align: center;
    }

    h2 {
      margin-bottom: 20px;
      color: #333;
      font-size: 24px;
    }

    /* 表单组样式 */
    .form-group {
      margin-bottom: 20px;
      text-align: left;
    }

    label {
      display: block;
      margin-bottom: 5px;
      color: #555;
      font-weight: bold;
    }

    input[type="text"],
    input[type="password"] {
      width: 100%;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
      font-size: 16px;
      box-sizing: border-box;
      transition: border-color 0.3s ease;
    }

    input[type="text"]:focus,
    input[type="password"]:focus {
      border-color: #005e21;
      outline: none;
    }

    /* 按钮样式 */
    button {
      width: 100%;
      padding: 12px;
      background: linear-gradient(45deg, #005e21, #005e21);
      border: none;
      border-radius: 5px;
      color: white;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      transition: background 0.3s ease;
    }

    button:hover {
      background: linear-gradient(45deg, #005e21, #005e21);
    }

    /* 注册链接样式 */
    p {
      margin-top: 15px;
      color: #555;
    }

    a {
      color: #005e21;
      text-decoration: none;
      font-weight: bold;
      transition: color 0.3s ease;
    }

    a:hover {
      color:#fff;
    }

    #msg{
      color: red;
    }
  </style>
</head>

<body>
<div id="Content">
  <h2>登录</h2>
  <form id="loginForm" action="/login" method="post">
    <div>
      <label th:text="${session.msg}"  id="msg"></label>
    </div>
    <div class="form-group">
      <label for="username">用户名:</label>
      <input type="text" id="username" name="username" required>
    </div>
    <div class="form-group">
      <label for="password">密码:</label>
      <input type="password" id="password" name="password" required>
    </div>
    <div class="form-group">
      <button type="submit">登录</button>
    </div>
  </form>
  <p><a href="account/register">注册</a></p>
</div>
<script src="/javascript/welcome-scripts.js"></script>
</body>
</html>
